#include "light.h"

#include "hi_adc.h"
#include <stdio.h> 
#include "cmsis_os2.h"

void Read_light(int *light)
{
    if(hi_adc_read(HI_ADC_CHANNEL_4, light, HI_ADC_EQU_MODEL_4, HI_ADC_CUR_BAIS_DEFAULT,0)==HI_ERR_SUCCESS)
    {
        printf("ADC_VALUE= %d\n", *light);
    }
    osDelay(100);
    (*light)++;
    return;
}